<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_quiz_student_ques_exercise".
 *
 * @property string $id 主键
 * @property string $t_course_id 开课ID
 * @property string $b_course_id 组课ID
 * @property string $ques_id 问题
 * @property string $is_correct 是否正确
 * @property string $is_skipped 是否跳过
 * @property string $is_doubtful 是否不确定
 * @property string $answer 答案内容（包括多选题）
 * @property string $answer_right 学生的正确答案
 * @property double $points_awarded 评分
 * @property string $answer_time 答题时间
 * @property string $major_id
 * @property string $create_by
 * @property string $create_time
 * @property string $update_by
 * @property string $update_time
 * @property int $del_flag
 */
class TQuizStudentQuesExercise extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_quiz_student_ques_exercise';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'create_time', 'del_flag'], 'required'],
            [['answer', 'answer_right'], 'string'],
            [['points_awarded'], 'number'],
            [['answer_time', 'create_time', 'update_time'], 'safe'],
            [['del_flag'], 'integer'],
            [['id', 't_course_id', 'b_course_id', 'ques_id', 'major_id', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['is_correct', 'is_skipped', 'is_doubtful'], 'string', 'max' => 64],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            't_course_id' => 'T Course ID',
            'b_course_id' => 'B Course ID',
            'ques_id' => 'Ques ID',
            'is_correct' => 'Is Correct',
            'is_skipped' => 'Is Skipped',
            'is_doubtful' => 'Is Doubtful',
            'answer' => 'Answer',
            'answer_right' => 'Answer Right',
            'points_awarded' => 'Points Awarded',
            'answer_time' => 'Answer Time',
            'major_id' => 'Major ID',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
        ];
    }
}
